import request from "@/utils/request";

// 发布论坛
export function postingForums(data) {
  return request({
    url: "/system/forum/forum",
    method: "post",
    data: data,
  });
}

// 查询论坛列表
export function setForumsList(query) {
  return request({
    url: "/system/forum/forum/list",
    method: "get",
    params: query,
  });
}

// 查询论坛详情
export function getForumsDetail(query) {
  return request({
    url: "/system/forum/forum/" + query,
    method: "get",
  });
}

// 删除论坛
export function deletaForums(data) {
  return request({
    url: "/system/forum/forum/" + data,
    method: "delete",
  });
}


// 新增点赞
export function addLike(data) {
  return request({
    url: "/system/forum/upvote",
    method: "post",
    data: data,
  });
}

// 删除点赞
export function deletaLike(data) {
  return request({
    url: "/system/forum/upvote/" + data,
    method: "delete",
  });
}

// 查询点赞列表
export function getLikeList(query) {
  return request({
    url: "/system/forum/upvote/list",
    method: "get",
    params: query,
  });
}

// 新增评论
export function addComment(data) {
  return request({
    url: "/system/forum/comment",
    method: "post",
    data: data,
  });
}

// 查询评论
export function getCommentList(data) {
  return request({
    url: "/system/forum/comment/list",
    method: "get",
    params: data,
  });
}

// 查询二级评论
export function getCommentTwo(data) {
  return request({
    url: "/system/forum/comment/listSecondaryComment/" + data,
    method: "get",
  });
}

// 查询三级级评论
export function getCommentThree(data) {
  return request({
    url: "/system/forum/comment/listThirdComment/" + data,
    method: "get",
  });
}




// 查询敏感词列表
export function listWords(query) {
  return request({
    url: '/system/words/list',
    method: 'get',
    params: query
  })
}

// 查询敏感词详细
export function getWords(sensitiveWordsId) {
  return request({
    url: '/system/words/' + sensitiveWordsId,
    method: 'get'
  })
}

// 新增敏感词
export function addWords(data) {
  return request({
    url: '/system/words',
    method: 'post',
    data: data
  })
}

// 修改敏感词
export function updateWords(data) {
  return request({
    url: '/system/words',
    method: 'put',
    data: data
  })
}

// 删除敏感词
export function delWords(sensitiveWordsId) {
  return request({
    url: '/system/words/' + sensitiveWordsId,
    method: 'delete'
  })
}
